package com.cooper.controllers;

import org.springframework.beans.factory.annotation.Autowired;

import com.cooper.core.MinasPropertyHandler;

import net.paoding.rose.web.Invocation;
import net.paoding.rose.web.annotation.Param;
import net.paoding.rose.web.annotation.rest.Get;

public class DownloadController extends Controller{
	
	@Autowired
	private MinasPropertyHandler minasPropertyHandler;
	
	@Get("{fileId}")
	public String download(Invocation inv, @Param("fileId") String fileId) throws Exception{
		return "r:" + this.minasPropertyHandler.getFileServer() + "download/" + fileId;
	}
}
